using System.ComponentModel.DataAnnotations;

namespace RAG.Domain.Entities.App;

/// <summary>
/// 会话实体
/// </summary>
public class Session : EntityBase
{
    public Guid Id { get; set; } //会话id
    public Guid UserId { get; set; } //用户id
    
    [StringLength(200, ErrorMessage = "会话标题长度不能超过200个字符")]
    public string SessionTitle { get; set; } = null!; //会话标题
    
    [StringLength(50, ErrorMessage = "会话状态长度不能超过50个字符")]
    public string SessionStatus { get; set; } = null!; //会话状态
    
    public DateTime? LastActiveAt { get; set; } //最后活跃时间
    public string? Metadata { get; set; } //元数据(JSON格式)
    
    // 导航属性
    public Users User { get; set; } = null!;
    public ICollection<Conversation> Conversations { get; set; } = new List<Conversation>();
} 